import request from '@/utils/request'

/**
 * 获取食图所有分类
 * @returns 
 */
export const getAllAffectCate = () => { 
    return request({ 
        method:'post',
        url:'/food/getAllAffectCate'
    })
}

/**
 * 根据食图分类获取分页数据
 * @param {*} params 
 * @returns 
 */
export const getFoodByAffectCate = params => { 
    return request({ 
        method:'get',
        url:'/food/getFoodByAffectCate',
        params
    })
}


/**
 * 根据id获取菜的详情信息
 * @param {*} params 
 * @returns 
 */
export const getFoodInfo = params => { 
    return request({ 
        method:'get',
        url:'/food/getFoodInfo',
        params
    })
}


/**
 * 根据地域id获取菜的分类信息
 * @param {*} params 
 * @returns 
 */
export const getFoodCateByLocal = params => { 
    return request({ 
        method:'get',
        url:'/food/getFoodCateByLocal',
        params
    })
}


/**
 * 根据菜的分类信息获取分页数据
 * @param {*} params 
 * @returns 
 */
export const getFoodByFoodCate = params => { 
    return request({ 
        method:'get',
        url:'/food/getFoodByFoodCate',
        params
    })
}

export const getAllPersonCate = () => {
    return request({ 
        method:'post',
        url:'/food/getAllPersonCate',
    })
}

export const getFoodByPersonCate = params => { 
    return request({
        method:'get',
        url:'/food/getFoodByPersonCate',
        params
    })
}